package br.com.social.mobile.daemon;

public class DaemonMain {
 
    static BDKeepAlive printTask = null;
 
    public static void main(String[] args) {
 
        Runtime.getRuntime().addShutdownHook(new Thread(new Runnable()
        {
            public void run()
            {
                // Do cleanup operations here
                printTask = null;
                System.out.println("Cleanup activity: PrintTask instance set to null");
            }
        }));
 
        // Invoke the daemon/background process code
        printTask = new BDKeepAlive("Hello World!");
        printTask.invokeIndefinitePrintTask();
    }
 
}